<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta charset="utf-8">
	<title>成功加入购物车--当当网</title>
	<link href="<%= basePath %>css/shopping_intermediate.css" rel="stylesheet" type="text/css">
	<link href="<%= basePath %>css/header_960_150611.css" rel="stylesheet" type="text/css">
</head>

<body>
	<div class="shoppingcart_wrapper intermediate">
		<div class="intermediate_box clearfix intermediate_box_tj" id="add_more">
			<!-- 商品添加成功信息显示 -->
			<div class="intermediate_left">
				<div class="success">
					<h1>商品已成功添加至购物车！</h1>
				</div>
				<div class="vertical_middle">
					<p>
						<a title="${item.gname}" href="<%= basePath %>detail/${item.gid}">
							${item.gname}
						</a>
						<span class="redtip">
							¥${gprice}
						</span>
						<span class="orgtip">
							x
							<!-- 从购物车中取得购买商品的数量 -->
							<c:forEach items="${sessionScope.shoppingcart}" var="entry">
								<c:if test="${entry.key.gid eq item.gid}">
									${entry.value}
								</c:if>
							</c:forEach>
						</span>
					</p>
				</div>
			</div>

			<!-- 购物车概况 -->
			<div class="intermediate_right" style="padding-top:35px;">
				<h2>
					购物车中已有
					<span class="redtip">
						${count}
					</span>
					件商品
				</h2>
				<h3>
					应付总额（不含运费）：
					<span class="redtip" id="J_payMoney">
						¥
						<fmt:formatNumber maxFractionDigits="2">
							${cost}
						</fmt:formatNumber>
					</span>
				</h3>
				<p>
					<a class="org_btnb" href="<%= basePath %>getShoppingCart">去购物车结算</a>
					<a class="promo_btn" href="<%= basePath %>index">继续购物</a>
				</p>
			</div>
		</div>
	</div>
</body>
</html>